#ifndef _IO_CMD_H_INCLUDED_
#define _IO_CMD_H_INCLUDED_

#define CMDPARAM_NULL   0
#define CMDPARAM_NUMBER 1
#define CMDPARAM_TEXT   2
#define CMDPARAM_BOOL   4

struct TCmdParam
{
    int type;
    bool asBool;
    float asNumber;
    char *asText;
};

typedef bool (*TCmdFunc)(int nrParams, TCmdParam *params, TCmdParam &result);

bool cmd_init();
bool cmd_shutdown();
bool cmd_exec(char *str, TCmdParam &result);
bool cmd_execFile(char *fname, TCmdParam &result);
bool cmd_add(char *name, char *alias);
bool cmd_add(char *name, TCmdFunc func);
bool cmd_remove(char *name);

char *cmd_nextToken(char *str, TCmdParam &token);

#endif //_IO_CMD_H_INCLUDED_
